Types of Trial Licenses
You can provide the following types of trial licenses to your customers:
Days-based Trial License
Allows running the licensed software for a specified number of days (calendar-based).
Hours (Usage)-based Trial License
Allows running the licensed software for the specified number of (total) hours.
Notes:
>The trial period (counter) starts only when the licensed software is used for the first time. The license will not expire before its first usage (if no end date is specified).
>Optionally, you can associate a (calendar-based) start date and an end date with a trial license. However, the license will expire as soon as any of the limits (trial days/hours/the calendar end date) is reached; irrespective of whether the license was used or not.
The following table lists a few scenarios for using a trial license:
Case# |
Trial Days |
Start Date |
End Date |
Usage |
1 |
30 |
None |
None |
>The software can be used on any day, irrespective of the date. >The trial period will last for the next 29 days after the software is first run. |
2 |
30 |
January 1, 2018 |
June 30, 2018 |
>The software cannot be used before January 1st. >The trial period will last for the next 29 days after the software is first run or up to June 30th (whichever is earlier). |
3 |
30 |
March 1, 2018 |
None |
>The software cannot be used before March 1st. >The trial period will last for the next 29 days after the software is first run. |
4 |
30 |
None |
March 30, 2018 |
>The software can be used only before March 30th. >The trial period will last for the next 29 days after the software is first run or up to March 30th (whichever is earlier). |
Case# |
Trial Hours |
Start Date |
End Date |
Usage |
1 |
1 |
None |
None |
The software can be used for 1 hour, in total, without any dates restriction. |
2 |
1 |
March 1, 2018 |
March 30, 2018 |
>The software can be used for 1 hour, in total, between March 1st and 30th. >The license will expire either after one hour of (60*60 seconds)usage or on March 30th. |
3 |
1 |
March 1, 2018 |
None |
>The software cannot be used before March 1st. >The license will last for maximum one hour. |
4 |
1 |
None |
March 30, 2018 |
The software can be used for maximum one hour and before the end of March 30th. |
Security of a Trial License
The calculation of elapsed hours is not dependent on the system clock. Thus, even for systems that support access to clock ticks or its equivalent, the license cannot be used more than the maximum allowed hours.
The trial license security data is maintained in the persistence storage. This information is retained even after deleting the license. Subsequent addition of the same license will not allow usage beyond the expiration date/hours.
Also, since the trial license persistence storage is software vendor specific, corruption of persistence storage of a specific software vendor does not affect others.
However, to create the persistence storage for standalone applications, it is important to call the sntlInitStandaloneSystem API function at the time of application installation.
For more details on system initialization, refer to Persistence Data-Dependent License Models.
Trial License Precedence
By default, a normal license has a higher priority compared to a trial license. However, under certain cases, your customers may want to enforce trial licenses over normal licenses. An example would be when they have unexpired valid trial licenses in hand and want to exhaust them before switching to a normal license. Alternatively, they may have multiple trial licenses and want to first use the ones that have the earliest expiration dates.
This can be achieved by setting the precedence of a trial license. The precedence is a numeric value that decides the priority of a trial license with respect to other licenses. A trial license can have any of the following precedence levels:
Level |
Meaning |
License State |
1 to 231 -1 |
The positive values between 1 and 2,14,74,83,647 set the preference order among trial licenses; a higher value gives a higher priority |
Enabled |
-1 |
Sets the highest priority, irrespective of the license model (higher than normal licenses as well) |
|
0 |
The license cannot be used under any circumstance |
Disabled |
NOTE Trial licenses, when installed for the first-time, are always in enabled state with precedence equal to one (1).
Setting the Trial License Precedence
In this sub-section, we shall learn how to set the precedence for trial license during different stages.
During the Development Stage
You can set the license precedence using the VLSsetLicensePrecedence API function introduced in 8.1 release. For details about the function, refer to the Sentinel RMS SDK API Reference Guide.
During the License Management Stage
Your customers (or their system administrators) can set the license precedence using the lslic utility.
NOTE The precedence set last will be overridden by the current precedence. For example, if you set precedence by calling the VLSsetLicensePrecedence API function, it will be overridden by a value set using the utilities.
Figure 3: Setting Precedence Using lslic